#set(show_side_search = false)
#set(show_side_words = false)
#set(show_side_tagcloud = false)
#set(show_flinks = false)

#include("./layout.html")
#@layout()


#define content()
<div class="post-main">
    <div class="post-list-page-plane">
        <div class="list-plane-title">
            <div>#(category.title ?? '所有文章')</div>
        </div>

        #articlePage(pageSize=20)
        <ul class="post-list">
            #for(article : articlePage.list)
            <li class="post-item">
                <div class="post-item-container">
                    <div class="post-item-thumbnail">
                        <a href="#(article.url)">
                            <img src="img/loading.gif" data-original="#(article.showImage ?? option('japress_thumb','/templates/japress/img/thumbnail.png'))"
                                 alt="#(article.title)">
                        </a>
                    </div>
                    #articleCategories(article.id,"category")
                    <div class="post-item-tags">
                        #for(category : categories)
                        <span class="cat-item">
                                     <a href="#(category.url ??)">
                                         #(category.title ??)
                                     </a>
                             </span>
                        #end
                    </div>
                    #end
                    <div class="post-item-main">
                        <h2>
                            <a href="#(article.url)">
                                #(article.title)
                            </a>
                        </h2>
                        <div class="post-item-content">
                            #if(article.summary)
                            #(article.summary)
                            #else
                            #maxLength(article.text,130)……)
                            #end
                        </div>
                        <div class="post-item-info">
                            <div class="post-item-meta">
                                <div class="post-item-meta-item">
                                         <span class="post-item-meta-author">
                                             <img alt="" src="#(article.user.avatar ??)" class="post-item-avatar">
                                             #(article.user.nickname ??)
                                         </span>
                                    <span class="post-item-time">
                                             #date(article.created)
                                         </span>
                                </div>
                                <div class="item-post-meta-other">
                                         <span>
                                             <i class="fas fa-eye" aria-hidden="true">
                                             </i>
                                             #(article.view_count ?? 0)
                                         </span>
                                    <span>
                                             <i class="fas fa-comment-alt-lines">
                                             </i>
                                             #(article.comment_count ?? 0)
                                         </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
            #end
        </ul>
        #end
        #articlePaginate(activeClass='current')
        <div class="pages">

            <div class="fenye">
                #for(page : pages)
                <a href="#(page.url ??)" class="#(page.style)">#(page.text)</a>
                #end
                <span class="page-count pagedbox">#(articlePage.pageNumber)/#(articlePage.totalPage)</span>
            </div>

        </div>
        #end

    </div>
</div>
#end


#define sidebar_top()
#if(category != null && category.type == 'category')
<div class="aside-box"><h2 class="widget-title">栏目简介</h2>
    <div class="textwidget"><p>#(SEO_DESCRIPTION ?? '可以通过配置分类的SEO描述来修改这里的文字')</p>
    </div>
</div>
#end
#end